Fix contours for py3