fixed utils.js and a bad err route in middleware