Bugfixes

All tests and partests on 2.11 pass.