small perf improvements.