fixes #791