Fix broken exclude logic