fix bug when creating new client