Fixed array out of bounds error in getUniqueList

Fixed an array out of bounds error and also made sure that it returns the right number of restaurants