fixed error with the pose estimation code