fixed onresume bug