fixes NSUserDefaults and errors when trying to search