Added if-else statement to correctProgram.qlang and fixed a templating bug.