fix limit queries