Did some performance optimization.