fixing api usage due to api changes