fix the index.php bugs