fixes #867