Dialog windows open conditionally

Just a small correction.