fix cleaning code