Fix rarely occurring bug, where the rotation is zero