Fixes for newer versions of CGExtensions.