fix all compilation errors