fix issue with input validation