fix infinite loop in master