fixed a no-friends bug that threw mysql exception for users with no friends