fixed a javascript issue