Optimizer fixes.