Fixed lots of bugs..ex. Shutdown catch