More efficient bounds check?