fixed javascript parsing issue