Bug fix

* close db connection