Fix errors in device_wrapper.txx