Try fix PSM build issues, I'd done these ones by hand.