Change example code, following 0.8.x/0.9.x API changes