Dialog windows open conditionally

It opens anyway, is my point.