fixing conditional statement in et-query