Update to work with latest rapi