Api version fixes

Fixed lib and tests to reflect the changes in the new api version