[core][bug] fix tokens merging