fixed the rotation problem with a constraint