cleanup before fetch