small changes to make it work on maxwiki