Fix bug in web-mode

This fixes #45. At least, so far as I can tell.