fix a tcmath bug