Added option to specify marginBounds