Fixed shutdown error on late garbage collection.