fixed avatar upload issues