fixes #790