clears word automatically if word is invallid