fixed saving references and dismissing add view