bug fix for issue #23