fixes "invalid" strings so they do not match anything the user will type