remove query by pid on parent window when close program.

check duplication when issue pid.
changed dispose query workflow.