fix content length adjustment