fix backward-compatibility issue related to 'cleanup' option