fixed notification close bug

Tiny change on something I noticed wasn't working. I tested this in Chrome and FireFox and it worked fine.