Quick work for Issue #39

I'm no Python expert, but this seems to work for me