saving/restoring the CG state isn't correct