Fixed query broken by param migration