[BUGFIX] Fix cgl cleanup introduced bugs