fix issue #24 on branch 0.6
Merge pull request #26 from stefanorg/0.6

fix issue #24 on branch 0.6