Fixes bug: Notification not triggered

Fixes a bug where if the app is closed in such a way that it remains open in
the background, notification s get suppressed.