fix for bitwise operations used in if statements