added trace cancelling for when ui lags