fix crash on client creation