fix bugs affecting \marginheightadjustment and \extendmargin
Merge pull request #8 from dariobuttari/patch-3

fix bugs affecting \marginheightadjustment and \extendmargin