fixed issue with incorrect number of results