Fixed a bug caused by isdigit()