Fixed bit-shifting errors.