Fix double-keystrokes by wrapping CreateDialog