Minor changes to add compatibility with new API