minor bug fix for background and foreground 
notifications