Fix incorrect creation of loggregator client