Fixed character detection in FireFox and Chrome.