fix pass logic