Fixed crash with empty input file.