fixed bug cg