Fix the bug that string ids are not handled collectly.