One more bug: A-2-3-4-5 is a straight, not a high card. Ace can be regarded as "14" or as a "1", whichever is more beneficial.