fixed problems with performance