Bugfixes in TLK charset selection routine