some changes
fix some problems with db