Keep previous queries open when restoring a previous query