bugfixes with input file