Fix ansi-term overwriting issues