merged patch from #96