[core] fix bug about context