Perf optimized slightly.