Fixed version of change to isMaster