fixes #821