Check if index exist to avoid warnings