fixed performance issues