fixes #824