Some extra optimizations