Adapt to API changes in 1.5