K0ertis - when you restart the simulation, are you clearing the function so that all persistent variables are reset? According to persistent persistent X Y Z defines X, Y, and Z as variables that are local to the function in which they are declared; yet their values are retained in memory between calls to the function.
So if you run the first simulation - after a restart of MATLAB - then pNew will be empty. And as the simulation progresses, calls to this function will use the value of pNew from previous calls. Now if you stop the simulation, and start the next one, won't the airbag function still be in memory with the same persistent values set as before (during their last call)?
Again from the above link,
Whenever you clear or modify a function that is in memory, MATLAB also clears all persistent variables declared by that function.
So I think that you want to do is to clear these persistent variables by adding some sort reset/refresh command to the beginning of your simulation which just clears any and all persistent variables from across all of your functions. Something like
Try the above and see what happens!