Guess what. I should never have tried to fix it myself. It was not working after all. when I choose any other option but the default to edit the page reloads and gives me an error in the chmod lines we just added.
Could you please check the code and see what I should actually have there?