core: fix warning bugs on unused vars introduced by the last commit