fixed logger memleak