fixed input bugs in CharGenerator