fixed a number of cuda bugs