Fixed dialog issue

The dialog now doesn't bring MainActivity to front.