Fix to clean() function.