Fix bug with upload