Added support for margins