fixed infinite loop bug in notification model