prevent accidental negative index lookup