fix errors in web.py