fixed issues with ansi-term output