fix orphan pointer to invalid char *