Minor perf improvements

Minor perf improvements