fix #7174, mostly