@ core: some bugs fixed