Fixed logic for remove to update replicas