Fixed typo res.headerSent => res.headersSent