Fix to set 'Content-Length' header