Corrects select, so it actually counts and returns rows.