fixing compilation errors