[FIX] API, QueryListener: unregister process only if it was registered