Do you have "automatically restart" checked in control panel/system/advanced/startup & recover/system failure? If so, in the event that XP encouters a problem closing a certain application during the shutdown process, it will automatically restart itself. Check your event viewer to see if any error had occured during the shutdown time.