generate.php corrections