Fix segfault on shutdown and left-over pengine process on heartbeat stack -- prevent dates from jumping backwards