fix #688 (requires tests)