fix clientid handling