Fixing idle process issues during exit