Update db on UI updates