fix friend logic