Fix #831 by saving/restoring PD options