More fixes to get pd to work