correct the shutdown logic

if state isn't set to :stopping, or something other than :working, then it won't actually shutdown