db fix and api start to work