added the resetting of the serialize function on shutdown