fix infinite loop on set