Fixed: Cannot exit Progress dialog on recursive query

Fixed: Registry.set without id fail (id=0 by default)