Fixed the bug described in the pull request #109.