Fixes to handling disconnected states