fixes #5788