Multi-device bugfix for pwsafe-cuda.