Added exception safety