more high availability - applying fixes to #1362

applying the fixes suggested in #1362 (also the tiny ones from #1366)