Fix clean function