fix perf issue