Fixing logic to allocate existing slaves