def fix_index_error(data):
    """
    Fix list index out of range error by checking if the length of the data is greater than the index.

    Args:
        data (list): A list containing tuples with target data.

    Returns:
        list: The input data with a check to prevent index errors.
    """
    return [item for item in data if len(item) > 2]