fixed a bug in the notifications rewrite