Test and fix for issue #31