fixed utils.js and a bad err route in middleware
Merge pull request #366 from Pomax/errfix

fixed utils.js and a bad err route in middleware