Potentially fixed infinite loop in onNotify