image upload bug fix