some fixes
optimizations