Fix problem with ShowDialog when running as service