fix infinite hang issue. added recursion loop check to shuffle cards if loops goes for too long