fixed memory leak  in input checker