proposed fix for issue #26