Add more input error handling.