Fix bit fiddling