Close connection after each call in getTopObjectLabels