fix content-length bug