fix write homography