Fixed alert dialog bug