bug fix for issue #4