fixed infinite loop of callback adding