fix bug of wrong computation for body_len