fixed the rotation problem