Fixed more similar bit-twiddling bugs.
Fixed more similar bit-twiddling bugs.

shlomif/black-hole-solitaire,shlomif/black-hole-solitaire,shlomif/black-hole-solitaire,shlomif/black-hole-solitaire,shlomif/black-hole-solitaire,shlomif/black-hole-solitaire