Fix bounds check.