fixed bug calculating .box margin sizes