fixing content length bug