fixes #771

issue #771