lesson learned: don't export a 'shutdown' function