fixing some things for perf