Fixing client side code