Changed initialization of Tensor and a double.