fixes #5865