fix to prevent negative padding/margins