fix js bug var instead of bar