try fix cuda bugs