Global optimization fixes.