Bugfixes und improvements of the cuda tests