Prevent an error during shutdown cleanup and fix a function call