fixed performance problem