Fixed bug in margin