a bit of defensive code with arrays being empty (possible if no clients or no servers connected...)