Always register the shutdown function, since it is ok to register multiple