Fix off by one errors in perturbation code.

Change-Id: I42cfc59b71e13e3163779ed6703073320298f948
1 file changed