bug fix in margin collapsing conditions