added earlier role check for slave replication