bug fixed for getDeviceID function