Fixed tensor bug.