Made previous change compatible with Contao < 3.1