fixed performance issue