Fix the writeHead invocation