Added logic to protect against out of bounds errors when setting num ratings threshold too high, and there arent enough results.