fix path and js.php bugs