Margin correction