fixes #5796