Minor tweaks for perf optimization.