avatar upload validation fix