Fixed some conditions in UDPLPD.