fix end-of-loop logic to work for all poker flavors