fixed dismiss alert bug
added autoDismissAlerts