fix ptype references