fixes #2789