fixed some db bugs