add reset master before changing it