Fix issue with db. Change structure