some fixes
fixed performance issues