Fix ansi
Fixed memory leak