Bug fix for format.php