fixed more bitwise ops bugs instead of logic