fixes for optional oauth/api key and system queries blocks