fix bug in db handle code
Merge pull request #295 from teharrison/develop

fix bug in db handle code