Fix loading corrupted files