Fixed some LDP bugs.