Fixes to eliminate output errors in index.php file