Fix bug if only one connection used.