fixed error message when branch cannot be saved