fixed a performance degradation