fix for bugzilla 7693

enum and bool both fixed and pretty minimal
Merge pull request #1902 from burner/getoptEnumTailFix

fix for bugzilla 7693