Maybe id should actually be type_id to avoid confusion with the actual activity (unique per each instance). Marco