fixed bug which made the client to generate a new UID.