Fix issues when exiting
Now using struct GL generator