Fix exclude logic