Optimized. Fixes performance issue which makes ZSH usable again.