This fixes #798