Debugging of the rotation functions