Here a possible fix for HHH-9329

I know it's probably not the prettiest solution but at least it works.