fixed a problem with db