Fix cleanup command

Commit applies on top of current upstream commits