Fixed bug with auto-rectification.