Fixing datastore life cycle