fix problem with database