fix the input verification