[core][bug] fix bug in debugging mode