fix Dbdriver and minor bugfix

Signed-off-by: Roger Manich <roger.manich@gmail.com>