Bugfixes and PD changes