Fixed the alert dialog problem