remove shutdown hook when restart.