#2: fixed onmaster event