many fixes to make it work on github.io