core: fix crash