Use var instead of const on client side