fixed finalized queries' variables