fixed issue when trying to upload to root directory