The tensors indexing issue resolved.