fix bug that closed local db comment variable and as a result threw a 'db is closed' error