fix tangent problem