fixed the compilation errors