adding rid to fix API. small fixes