Fixed bug when error found in input.