avoid NPE during shutdown of replication, after a fix on replication