Fixed a few characterset bugs