bugfix file upload helper