fix issue with http request and fix state for query example selection