Fixed the save cover and avatar functions