fixed a problem on DB class