Revert "Revert "issue #182""

This reverts commit 10366924a2dd02ac38a2f6286412f3eb64c7570d.