fixed bug when notification opens with app closed, several tweaks