Updated for contao 3 compatibility