Fixed a bug where changing to YAML grammar threw an exception.