Fix bug in popup and tilde keystrokes.