Fix DB structure