Fix limit query