Manually apply fix for issue #45 to master branch too