Added code to handle make it easeir to switch to the ansi-term buffer