Update minting.php, some error fixes.