Adding fix suggested in issue #45