Fix compatibility with latest sdk