fix bug in cleanup_old_processes