refs #158 set core->state = CORE_CLOSED in case of forced shutdown