Minor bug fix on device registration control