Fix (again) for datastore action when called from an extension

too much trying to be pretty, too little testing.