restore changes from c981f63d

lost during pull request #4 to f9a90829
Merge pull request #5 from Anacode/pr4-fix-master

restore changes from c981f63d