Dialog almost working