Fix the RAII which was really a guard.