fix minor bug in gpu.cu