core: main: fix reference error