[core] gc engine: fix bug