Fix fatal error on export.php