Fix for github issue 143