minor optimizations.