Bad_alloc fix (kinds are replicated now).