dh_dbtool bugs fixing