PSD version 12
Fix build problems