Fixes most of #7206, fixes #7200, fixes #7184