Update to new calling convention