Fix bug when retriving corrupted files.