Optimizations

fixed