Fix clear master log bug