fixes some bugs on speed.php