More ugliness fixes