More cuda fixes.