file upload: Fixing problems with image upload