fix a bug in guessing rule generation