Avoid an error on shutdown