fix a bug in Core.hpp