Fixed bugs, added client_ip param