fixed javascript stuff