fix perf problem