bug fix for issue #7