Fix connect logging for corner cases