Minor fixes. DM handler doesn't work just now!
Fixed db handling issue
Finally fix the DB issue