Fix the compilation with direct and indirect mode