Fixed bit operations in Raw IO wrapper.