fixed type in closeDb