Fix edit detection when selecting a different device