fix loop in dm
db