fixed error with margin settings