Minor corrections to device code