fixed client side so it works with new server code