fixing limit queries