Fixed dialog crashes.