Fixes to play nice with polymorphism.