Merge pull request #194 from evil-dog/master

Fix for issue #189.
this is at least an improvement :-) thanks
Fixed issue #146 linking to sample code.