Fixed the bitwise operations