Change the master detection method