Fix for github issue 138