fix issues for uploading and deleting with files