Further expansion of bug fix for issue #31