Fix concurrent error in the core's timeout mechanism