Rotation fixed, added some debugging print lines