fix memory lags