Dialog change to AlertDialog(Solved bugs with dialog)