fixing bug in dismissNotifications