fix weird bugs in index.php