fix bug when calling call_on_change more than once