fix compilation error due to api changes