Fix hanging cleanup