Fixed issue with bitwise operations