some fix in random, and tensor1