Fixed the new client function