update db and some fixes