Apply margin correctly