correct handling of multi clients