test for issue #821