fixed erroneous image upload problem