fixed some tests
fixed db test