fixed javascript issue