fix for imporper termintaion of input file