Fixed retro-compatibility issue when reading file