Updated some of the port_max.c code.