fixes #5866