Prevent overflows/underflows in correction code.