fixed use-after-free. missing null term on strings