fixed character type bug