Fix after API changes. Should now be ready for 0.4 RC