Fix image upload bug
Merge pull request #339 from VitSalis/upload_image_bug

Fix image upload bug