Fiexed a bug due to the presence of null RHS in a production rule.