- Some improvements detecting invalid characters