Better check for illegal characters