fixes #798