Bad character range fix