Bugfix - handle negative margins correctly.