Merged fix for the patch from Release-0.8.0 tag