Fix for new API changes