fix notify logic