cleanup command + lock fix