fix onresult callback