Fixed queued queries being executed twice