backported issue #386 fix to version 0.10
Merge pull request #388 from tekii/0.10

backported issue #386 fix to version 0.10