Fixed a minor bug with contour transformation.