fixed bit shifting so they have proper values