Fix for issue #140

This is a proposed fix for #140.