fixes #5872