fixed datastore query variable subst