Small bug fixes to grammar