Fix undefined property nid when creating new space