Fix notify function