Fix js error on operator change