Improve perspective correction
