Fixed some issues with recent optimizations.