Fix compilation errors and make CI green