fix for #196
improved fix of #196
Merge pull request #197 from pzinn/master

fix for #196