Report fixes

Fixed various errors with report generation.
Connect.php sucks