fixed performace issue