Add the manager and fix compilation error