Fixed some CGL issues