Fixes how db update is done

Change-Id: I66a516e9453f5d40513cde68eb14f1774df0329c