Fix a bug in the Write_Queries.php