Use shutdown callback instead of after