fixed issue in checkInput