fix bug in createMaster