Fixed bug in gpu_mem_gpu_to_cpu function.