Fixes discussed in the pull request #119