fixed bug when structuredResult is requested