memory leak fix part 1
fixed an issue where memory leaked from a unhandled loose character pointer