Fixed uninitialized memory error when using multiple GPUs