Fix auto margin issue