Fix bug with ansi escape sequence