Fixed exception safety in copy and move ctor