Added check to see if KeepContext is true and context should be kept after ending the request.