Bug fix for image uploader