Fixed DBI bugs