fixed small bug in memory store