Next stab at fixing compilation errors