fixed a small DB bug