apply patch from #13, with fixes from #14

Closes #3191302

Merge request reports

Loading