Remove extra space between contour and the margins