Fixed a bug which some char may return integer smallther than 0.