Minor change for computing max lag and max PP sample

Round PP sample up and fix max lag which was off by 1 sample