Fixes for uploading files