Fixed scope issue with file uploader