small fixes in main database