fix bound check that causes infinite recursion