Fixed javascript issue