Fix bug in which entering a command after clicking a link caused the command of the last-clicked link to be resent