[bugfix] clean query answers for dynamic queries.

previously the clean only happen for static variable, therefore meaningless.