Fixed term and ansi-term mode not working correctly.