bug in device registration!