Fix isMaster error