Fix some trimming issues & kill the request when completed.