fix bug with InMemory Provider