Bug fix for issue #21