Fix subscript error in new bound detection