removed replace inserttags call and changed hook to modifyFrontendPage
Now we need contao 3.1.x