Grammar optimization. Minor bugfix.