Correct bit flipping behaviour.