fixed content-length bug