fix a bug in the grammar