Set right some db issues