how to avoid lags