Add compatibility with rapi v1