fixes #877