Fixes situations where connect and disconnect callbacks are missing.