Fix crash when displaying shortcut preferences