fix onresume exception