Fixed database closed on replication after the db has been automatically installed