Add test and fix for issue #96.