Bug fix for issue #170