Improved Contao 3 compatibility