Added dismissal of alerts when navigating