Changed to a non stupid shutdown system