Fix for gallery pic upload.