fix crash in OpenDialog