tests for issue

Fixes #782