fix pt code