Improve ansi rendering, fixes \r parsing