Fix compilation errors