Make it work with the latest API