Make sure we only trigger shutdown once