Fix of DB mistakes

Change-Id: I5f7994b10be4ea996e3a692b19a08c92a5332111