Fixed an error in CudaMatrix