Modifications to pass tests on 0.4-dev