fix for issue #47