fixes #767