Improved exception safety