small typo in greg.py

Hi, sorry for going MIA. I finally got around to testing your implementation. It seems there was a tiny typo but once I corrected that it seems to work very well. I think it greatly expands the usefulness of the program, thanks!