fixing newline bug in inputs parsing