Toggle dialog at a different time
Recapture the argument instead of just passing it into function