Minor fix in input filter function