correct padding with contour