Added support for maximum X/Y dimensions