Fix clean logic