fix web client, I should write more tests