fix to work with latest version of API