Another attempt at a perf fix