remove extra margins as much as possible