Changed reboot registering code ( * FURTHER TESTING REQUIRED)