fix another cuda bug