Fixed segfault on empty input file - thanks drone|