a bit of fixes
Merge https://github.com/beched/libpywebhack