Fixes a typo: res.headerSent => res.headersSent