Fixing cuda test codes