[UP] Reduce redundant logic.