Fix getting right number of results