fix PHP warning in lib/cleanup.php