fixed a few compilation errors