fixes #5837