Fix callback for res.on('end')