fix compilation crash recently introduced on the cuda code.