fixes #843
fix tests