Solved division by zero for PWall == 0 by changing it to 1E-10