Fix TypeError on clicking on any of the shortcuts.