Changed a bug in getFriends where the conditional was wrong.