misc cleanup fixes