bug fix for issue #21