Fix of DB mistakes

Change-Id: I0e473aad6daee39fa3fd514b6d0fb2cbda172c46