#509 added support for query limits