Updated due to API changes