Fixed issue that prevents a limit being applied to an ORDER BY statement