fix text_len null ending