Changes to make it works on Opencms9