Cleanup self on shutdown correctly