fixed bug closing database connection
Merge remote-tracking branch 'origin/master'