pathmax.c modified