bug correction in index.php