fix lib/scripts.php