Bug fix in index.php