Fixed the \pd macro in various ways