ignore \0 characters in device_id