fix problems with db access
fix problems with db access