Better replaying of messages once back online

Earlier had an auncaught condition