Fixed issues with the raft replication.