Fixed memleak in chat log history