Fix bugs where user could not download the same file again.