Fix cleaning code