Tried to fix cmd_free, failed