fixed eventually invalid free() in command_tag()