fixed bugs in current device registration.