Fixed bug in grammar