fixed issue at extremes of rotation