Fix error with opening datastore