fix issue #136
Merge pull request #138 from lindegroup/issue-136

fix issue #135 and #136