replaced Compiler.mode with Project.mode