Fixed test on end of file.