Fixed section of action.php that was causing reports to fail