Fix range check on avert harm