Don't use $Dialog... there is absolutely no use for it in this situation.