Fix typo
Some performance improvements