Fixes for API changes