Fixed add client function