Fix related to #39

Actually I didn't not test it (no environment installed yet) but should
work. I'm asking author of #39 to check it out.
Merge pull request #40 from semack/master

Fix related to #39